/**
 * Copyright 2018 orivil.com. All rights reserved.
 * Use of this source code is governed by a MIT-style
 * license that can be found at https://mit-license.org.
 */

package main

import "gitee.com/tugoer/orivil"

func main() {
	// handle 主页
	orivil.Handle("GET", "/", func(ctx *orivil.Context) {
		ctx.VDir("i18n").View("index")
	})

	// 设置 i18n middleware
	orivil.SetAfter(orivil.I18N, func(act *orivil.Action) bool {
		if act.Method == "GET" {
			return true
		}
		return false
	})

	orivil.Run()
}
